"use strict"; function dzsajx_get_query_arg(purl, key){ //console.info(purl); if(purl.indexOf(key+'=')>-1){ //faconsole.log('testtt'); var regexS = "[?&]"+key + "(.+?)(?=&|$)"; var regex = new RegExp(regexS); var regtest = regex.exec(purl); // console.info(regex, regtest); if(regtest != null){ //var splitterS = regtest; if(regtest[1]){ var aux = regtest[1].replace( /=/g, ''); return aux; }else{ return ''; } } //$('.zoombox').eq } } var readyList = []; var loadList = []; // var $ = jQuery.noConflict(); (function(){ // Store a reference to the original ready method. // var originalReadyMethod = jQuery.fn.ready; // // // Override jQuery.fn.ready // jQuery.fn.ready = function(){ // // try{ // if(arguments.length && arguments.length > 0 && typeof arguments[0] === 'function') { // readyList.push(arguments[0]); // } // // // Execute the original method. // originalReadyMethod.apply( this, arguments ); // // }catch(err){ // console.info(err); // } // // super(this,argument); // }; // console.info(jQuery('body').hasClass('dzsajx-enable-reinit')); // console.info(jQuery('body').attr('class')); var scripts = document.getElementsByTagName( 'script' ); var thisScriptTag = scripts[ scripts.length - 1 ]; // console.info(thisScriptTag.src); // -- let's see if scripts_reinit_document_ready is set to ON if(String(thisScriptTag.src).indexOf('9.012')){ var originalReady = jQuery.fn.ready; var originalLoad = jQuery.fn.load; jQuery.fn.extend({ ready: function() { if(arguments.length && arguments.length > 0 && typeof arguments[0] === 'function') { readyList.push(arguments[0]); } // console.log('custom ready'); return originalReady.apply(this, arguments); } ,load: function() { if(arguments.length && arguments.length > 0 && typeof arguments[0] === 'function') { loadList.push(arguments[0]); } // console.log('custom load', arguments[0]); return originalLoad.apply(this, arguments); } }); // Used to trigger all ready events jQuery.triggerReady = function() { // window.$ = jQuery; // window.$ = jQuery.noConflict(); // console.info(readyList); jQuery(document).add('*').off(); jQuery(readyList).each(function(){this(jQuery);}); }; jQuery.triggerLoad = function() { // window.$ = jQuery; // window.$ = jQuery.noConflict(); jQuery(loadList).each(function(){ // console.info(this); this(); }); }; setTimeout(function(){ // console.info(readyList, loadList); },2000); setTimeout(function(){ // jQuery.triggerReady(); },4000); } })(); jQuery(document).ready(function($){ // $.getReadyList = function() { // if(this.readyList != null) { this.myreadylist = [].concat(this.readyList); } // return this.myreadylist; // }; // setTimeout(function(){ // console.info('jquery ready', $.getReadyList()); // },2000); // $ = jQuery; // -- ajax vars var new_page_html = ''; var newclass_body = ''; var currclass_body = ''; var scripts_loaded_arr = []; var scripts_tobeloaded = []; var stylesheets_tobeloaded = []; var stylesheets_tobeadded = []; var scripts_tobeexecuted = []; var pages_caches = []; var state_curr_menu_items_links = []; var extra_items = []; var extra_items_tobeadded = []; var busy_main_transition = false ,new_page_not_loaded_yet = false // -- we use this to force load a page even if all scripts are not loaded ,page_change_ind = 0 ,content_wrapper_transitioned_out = false ,refresh_menu = false // -- we will need to refresh menu object if it is included in the content element ; var ___response = null; var windowhref = '' ,ajax_site_url = '' ,curr_html = window.location.href ,newtitle = '' ,newbodyclass = '' ,curr_html_with_clear_cache = false ,history_first_pushed_state = false // -- check if the first history state has been pushed so we can back to a outer page before the first one ,has_custom_outside_content_1= false // -- import custom content ; var _theActualNav = null ,_content = null ,_contentTransitioning = null ,_contentContainer = null ,_dzsajx_styles_con = null ,_dzsajx_scripts_tbe_con = null ,_dzsajx_caches_con = null ,_preloader = null ,content_selector = 'body' ,old_href = '' ,old_class_body = '' ,scripts_execute_after_ajax_call = 'off' ; var ceva = 'ceva' ,_html_for_classes = $('html').eq(0) ,_body = $('body').eq(0) // -- ajax vars END if(window.dzsajx_settings) { if (dzsajx_settings.site_url) { ajax_site_url = dzsajx_settings.site_url; } if (dzsajx_settings.content_container_selector) { _content = $(dzsajx_settings.content_container_selector).eq(0); content_selector = dzsajx_settings.content_container_selector; } if (dzsajx_settings.menu_selector) { _theActualNav = $(dzsajx_settings.menu_selector); if(_content.find(dzsajx_settings.menu_selector).length>0){ refresh_menu=true; } if (dzsajx_settings.menu_move_on_top_of_content && dzsajx_settings.menu_move_on_top_of_content=='on') { if(_content){ _content.before(_theActualNav); } } } if (dzsajx_settings.transition) { _html_for_classes.addClass('dzsajx-transition-'+dzsajx_settings.transition); _html_for_classes.addClass('dzsajx-preloader-'+dzsajx_settings.preloader); } if (dzsajx_settings.scripts_execute_after_ajax_call) { scripts_execute_after_ajax_call = dzsajx_settings.scripts_execute_after_ajax_call; } if(dzsajx_settings.script_call_on_ready){ try{ eval(dzsajx_settings.script_call_on_ready) }catch(err){ console.info('eval ready error - ',err, err.stack); } } } // console.info(_theActualNav); if(_content==null){ _content = $('body'); } _content.addClass('dzsajx-content'); // console.info(_content); if(window.dzsajx_settings) { if (dzsajx_settings.preloader=='bar' || dzsajx_settings.preloader=='bars' || dzsajx_settings.preloader=='custom') { var aux ='